﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LEET.PlayBack
{
    public class Assert
    {
        public static void AreEqual(object expected, object actual)
        {
            if(!(expected == actual || (expected != null && expected.Equals(actual)) ))
                throw new AssertionException("Assert.AreEqual Failed: Expected <"+expected+"> but got Actual <"+actual+">");
            
        }

        public static void AreNotEqual(object unExpected, object actual)
        {
            if (!(unExpected == actual || (unExpected != null && unExpected.Equals(actual))))
                throw new AssertionException("Assert.AreNotEqual Failed: Did not want <" + unExpected + ">");
        }

        public static void IsTrue(bool condition)
        {
            if (!condition)
                throw new AssertionException("Assert.IsTrue Failed: Got False");
        }

        public static void IsFalse(bool condition)
        {
            if (condition)
                throw new AssertionException("Assert.IsFalse Failed: Got True");
        }
    }

    public class AssertionException : Exception
    {
        public AssertionException() { }
        public AssertionException(String msg) : base(msg) { }
    }
}
